package com.zhouyer.study.demo.controller;

import com.zhouyer.study.mvcframework.annotations.Security;
import com.zhouyer.study.mvcframework.annotations.ZyController;
import com.zhouyer.study.mvcframework.annotations.ZyRequestMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author zhouyao
 * @description 权限测试控制好器
 * @date 2021/8/21 11:47 下午
 */
@ZyController
@ZyRequestMapping("/security-demo")
@Security(value = {"wangwu","zhangsan"})
public class SecurityDemoController {

    @ZyRequestMapping("/handle01")
    public void handle01(HttpServletRequest request, HttpServletResponse response) {
        System.out.println("成功访问到SecurityDemoController中的handle01");
    }

    @ZyRequestMapping("/handle02")
    @Security(value = "test")
    public void handle02(HttpServletRequest request, HttpServletResponse response) {
        System.out.println("成功访问到SecurityDemoController中的handle02");
    }
}
